﻿@model SuperiorModel.TPagedModelList<SuperiorModel.ShopAppModel>
<table class="layui-table" id="AppList" lay-filter="test">
    <thead>
        <tr>
            <th>商城ID</th>
            <th>商户用户名</th>
            <th>商城名称</th>
            <th>商城类型</th>
            <th>商城地址</th>
            <th>支付方式</th>
            <th>创建时间</th>
            <th>修改时间</th>
            <th>状态</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.TList)
        {
            <tr>
                <td>@(SuperiorCommon.SecretClass.DecryptQueryString(item.Id))</td>
                <td>@item.LoginName</td>
                <td>@item.ShopName</td>
                <td>
                    @switch (item.AppType)
                    {
                        case 1:
                            <span>小程序</span>
                            break;
                        case 2:
                            <span>H5</span>
                            break;
                    }
                </td>
                <td>
                    @if (item.AppType == 2)
                {
                        <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini showUrl" href="javascript:void(0);" url="@(SuperiorCommon.ConfigSettings.Instance.WebUrl + "/Home/Index?spid=" + item.Id + "&said=" + item.ShopAdminId)">显示地址</a>

                    }


                </td>

                <td>@(item.PayType == 1 ? "我司代收" : "自有支付")</td>
                <td>@item.CreateTime</td>
                <td>@item.UpdateTime</td>
                <td>
                    @switch (item.OptionStatus)
                    {
                        case 1:
                            <span style="color:green">正常</span>
                            break;
                        case 2:
                            <span style="color:orangered">冻结</span>
                            break;
                        case 3:
                            <span style="color:red">欠费</span>
                            break;
                    }
                </td>
                <td>@item.Remark</td>
                <td>
                    @switch (item.OptionStatus)
                    {
                        case 1:
                            <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini optionStatus" opt="2" spid="@(SuperiorCommon.SecretClass.DecryptQueryString(item.Id))" href="javascript:;">冻结</a>
                            break;
                        case 2:
                            <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini optionStatus" opt="1" spid="@(SuperiorCommon.SecretClass.DecryptQueryString(item.Id))" href="javascript:;">恢复</a>
                            break;
                        case 3:
                            
                            break;
                    }
                    @switch (item.AppType)
                    {
                        case 1:
                            <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini" href="/Shop/ShopAppDetail?id=@item.Id">查看</a>
                            break;
                        case 2:
                            <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini" href="/Shop/ShopAppDetail_H5?id=@item.Id">查看</a>
                            break;
                    }
                    <a class="layui-btn layui-btn-normal layui-btn-xs layui-btn-mini showPriview" href="javascript:void(0);" Spid="@item.Id" Said="@item.ShopAdminId">首页预览</a>
                </td>
            </tr>
        }
    </tbody>
</table>
@Html.Partial("_TPager", Model.PagingResult)